package com.newtouch.bxzs.business.product.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 推荐产品排序BO
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2020/12/31 15:51</td>
 * <td>xiongdianqiang</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author xiongdianqiang
 * @version 1.0.0
 * @since 1.0.0
 */
@Data
@ApiModel("推荐产品排序BO")
public class ProductRecommendOnAppBO implements Serializable, Comparable<ProductRecommendOnAppBO> {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 8501963867100211993L;

    @ApiModelProperty(value = "主键")
    private String productId;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "产品简介")
    private String productIntroduction;

    @ApiModelProperty(value = "主推标识")
    private Boolean mainProduct;

    @ApiModelProperty(value = "缩略图地址")
    private String attachmentUrls;

    @ApiModelProperty(value = "产品热销,true为热销，false不为热销")
    private Boolean hotSale;

    @ApiModelProperty(value = "产品编码")
    private String productCode;

    @ApiModelProperty(value = "合作公司id")
    private String cooperationCompanyId;

    @ApiModelProperty(value = "合作公司名称")
    private String cooperationCompanyName;

    @ApiModelProperty(value = "产品标签")
    private String productLabel;

    @ApiModelProperty(value = "标签匹配个数")
    private Integer labelMatchingCount;

    @Override
    public int compareTo(ProductRecommendOnAppBO o) {
        return o.labelMatchingCount - this.labelMatchingCount;//降序
    }
}